﻿<%@ Control Language="C#" Inherits="System.Web.Mvc.ViewUserControl<CRM.Database.Model.SchedulerDataObject>" %>
<%@ Import Namespace="DevExpress.XtraScheduler" %>
<%@ Import Namespace="CRM.Models" %>

<% Html.DevExpress().Scheduler(settings =>
                                    {
                                        settings.Name = "schedulerTechnic";
                                        settings.CallbackRouteValues = new { Controller = "TD", Action = "TechnicSchedulerPartial" };
                                        settings.Storage.Appointments.Assign(DB.DefaultAppointmentStorage);
                                        settings.Storage.Resources.Assign(DB.DefaultResourceStorage);
                                        settings.ActiveViewType = SchedulerViewType.Timeline;
                                        settings.Storage.EnableReminders = false;
                                        settings.Width = Unit.Percentage(100);
                                        settings.OptionsCustomization.AllowAppointmentCreate = UsedAppointmentType.None;
                                        settings.OptionsCustomization.AllowAppointmentEdit = UsedAppointmentType.None;
                                        settings.OptionsCustomization.AllowAppointmentDelete = UsedAppointmentType.None;
                                        settings.Views.DayView.Styles.ScrollAreaHeight = 400;
                                        settings.Views.TimelineView.ResourcesPerPage = 5;
                                        settings.Views.TimelineView.Styles.TimelineCellBody.Height = Unit.Pixel(100);
                                        settings.Views.TimelineView.Styles.TimelineCellBody.Width = 300;
                                        settings.Start = DateTime.Now;
                                        settings.GroupType = SchedulerGroupType.Resource;
                                    }).Bind(Model.Appointments, Model.Resources).GetHtml(); %>